/**
 * @Author: ${userName}
 */
@RestController
@RequestMapping("")
public class Api${tableToJavaBean}Controller {

    @Autowired
    private Api${tableToJavaBean}Service api${tableToJavaBeanLF}Service;

    @GetMapping("/pageList")
    public ResultInfo<JlPage<${tableToJavaBean}VO>> pageList(${tableToJavaBean}QueryBO bo){
        JlPage<${tableToJavaBean}VO> res = api${tableToJavaBeanLF}Service.pageList(bo);
        return ResultInfo.success(res);
    }

    @GetMapping("/get/{id}")
    public ResultInfo<${tableToJavaBean}VO> getById(@PathVariable String id) {
        ${tableToJavaBean}VO res = api${tableToJavaBeanLF}Service.getById(id);
        return ResultInfo.success(res);
    }

    @PostMapping("/add")
    public ResultInfo add(@RequestBody @Validated ${tableToJavaBean}FormBO bo){
        api${tableToJavaBeanLF}Service.add(bo);
        return ResultInfo.success();
    }

    @PutMapping("/edit/{id}")
    public ResultInfo edit(@PathVariable String id,@RequestBody ${tableToJavaBean}FormBO bo){
        bo.setId(id);
        api${tableToJavaBeanLF}Service.update(bo);
        return ResultInfo.success();
    }

    @DeleteMapping("/del")
    public ResultInfo del(@RequestBody List<String> ids){
        api${tableToJavaBeanLF}Service.delByIds(ids);
        return ResultInfo.success();
    }
}